﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PX.ShowLayerV2
{
	public class BaseView : TonyNet4V1.ShowLayer.BaseView
	{
		public BaseView(string strDivID)
			: base(strDivID)
		{
			tfOperation.HeaderStyle.Width = 80;
		}

		protected override void SetControlCSS()
		{
			//base.SetControlCSS();

			//((Panel)Page.FindControl(strDivID)).CssClass = "TotalDiv";

			pFirstDiv.CssClass = "FirstDiv";
			pFirstFunDiv.CssClass = "FirstFunDiv";

			pShade.CssClass = "Shade";
			pFloat.CssClass = "Float";
			pFloatTitle.CssClass = "FloatTitle";
			lBtnFloatClose.CssClass = "FloatClose";
			pFloatButtom.CssClass = "FloatButtom";

			gvTable.SkinID = "QueryResult";

			pTable.CssClass = "ResultTable";
			pSecondButtom.CssClass = "SecondButtom";
			pSecondButtomTwo.CssClass = "Page";
			lBtnEdit.CssClass = "Operation";
			lBtnDelete.CssClass = "Operation";
			lBtnRead.CssClass = "Read";
		}

		protected override void OnInit(EventArgs e)
		{
			if (Session["LoginUserID"] != null)
			{
				((FormView)clsView).nUserID = Convert.ToInt32(Session["LoginUserID"]);
				((FormView)clsView).nDepartmentID = Convert.ToInt32(Session["LoginUserDepartmentID"]);
			}
			else
			{
				Response.Write("<script language=JavaScript>;parent.parent.location.href='login.aspx';</script>");
			}

			base.OnInit(e);
		}
	}
}
